FROM centos:centos7.9.2009 
WORKDIR /root 
RUN yum install -y wget git vim dos2unix
RUN wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
RUN yum install -y epel-release
RUN yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
RUN yum -y install yum-utils
RUN yum-config-manager --enable remi-php74
RUN yum install -y php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-redis php-bcmath php-gd php-json php-opcache php-pdo php-pecl-crypto php-pecl-mcrypt php-pecl-geoip php-recode php-snmp php-soap php-xml php-imagick php-pecl-zip php-common php-odbc php-tokenizer
RUN sed -i 's#;date.timezone =#date.timezone = Asia\/Shanghai#g' /etc/php.ini
RUN systemctl enable php-fpm.service
CMD ["php", "-v"] 

ADD / /root
RUN chmod +x /root/FRICC2/fricc2load/init_key \
    && dos2unix /root/FRICC2/*
RUN yum groupinstall -y "Development Tools" \
    && yum install -y zlib-static zlib-devel
#RUN cd /root/FRICC2/fricc2load/
#RUN phpize \
#    && ./configure \
#    && make \
#    && make install
RUN cp /root/Workfiles/fricc2load.so /usr/lib64/php/modules/
RUN echo 'extension=/usr/lib64/php/modules/fricc2load.so'>>/etc/php.ini
CMD ["php", "-m", "|", "grep", "fricc2load"] 

RUN cd /root/FRICC2/fricc2/ \
    && make \
    && cp fricc2 /usr/bin/